﻿using System;

namespace test1
{
    class ArrayTest
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            int[] marks = new int[n];
            for (int i = 0; i < marks.Length; i++)
            {
                marks[i] = Convert.ToInt32(Console.ReadLine());
            }
            int max = marks[0];
            int min = marks[0];
            int avg = 0;
            int sum = 0;
            for (int i = 0; i < marks.Length; i++)
            {
                max = Math.Max(max, marks[i]);
                min = Math.Min(min, marks[i]);
                sum += marks[i];
            }
            avg = sum / n;
            Console.WriteLine("max: " + max);
            Console.WriteLine("min: " + min);
            Console.WriteLine("avg: " + avg);
            Console.WriteLine("sum: " + sum);
        }
    }
}
